home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / standard / c.z / c
Encoding:
Text File  |  2002-10-03  |  5.5 KB  |  133 lines

  1.  
  2.  
  3.  
  4. cccc((((3333GGGG))))                                                                    cccc((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      cccc3333ffff,,,, cccc3333iiii,,,, cccc3333ssss,,,, cccc4444ffff,,,, cccc4444iiii,,,, cccc4444ssss - sets the RGB (or RGBA) values for the
  10.      current color vector
  11.  
  12. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      vvvvooooiiiidddd cccc3333ssss((((ccccvvvv))))
  14.      sssshhhhoooorrrrtttt ccccvvvv[[[[3333]]]];;;;
  15.  
  16.      vvvvooooiiiidddd cccc3333iiii((((ccccvvvv))))
  17.      lllloooonnnngggg ccccvvvv[[[[3333]]]];;;;
  18.  
  19.      vvvvooooiiiidddd cccc3333ffff((((ccccvvvv))))
  20.      ffffllllooooaaaatttt ccccvvvv[[[[3333]]]];;;;
  21.  
  22.      vvvvooooiiiidddd cccc4444ssss((((ccccvvvv))))
  23.      sssshhhhoooorrrrtttt ccccvvvv[[[[4444]]]];;;;
  24.  
  25.      vvvvooooiiiidddd cccc4444iiii((((ccccvvvv))))
  26.      lllloooonnnngggg ccccvvvv[[[[4444]]]];;;;
  27.  
  28.      vvvvooooiiiidddd cccc4444ffff((((ccccvvvv))))
  29.      ffffllllooooaaaatttt ccccvvvv[[[[4444]]]];;;;
  30.  
  31.      The subroutines above are functionally the same but declare their
  32.      parameters differently.
  33.  
  34. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR
  35.      _c_v   For the cccc4444 routines, this parameter expects a four element array
  36.           containing RGBA (red, green, blue, and alpha) values.  If you use
  37.           the cccc3333 routines, this parameter expects a three element array
  38.           containing RGB values.
  39.  
  40.           Array components 0, 1, 2, and 3 are red, green, blue, and alpha,
  41.           respectively. Floating point RGBA values range from 0.0 through 1.0.
  42.           Integer RGBA values range from 0 through 255.  Values that exceed
  43.           the upper limit are clamped to it.  Values that exceed the lower
  44.           limit are not clamped, and therefore result in unpredictable
  45.           operation.
  46.  
  47. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  48.      cccc4444 sets the red, green, blue, and alpha color components of the currently
  49.      active GL framebuffer, one of normal, popup, overlay, or underlay (see
  50.      ddddrrrraaaawwwwmmmmooooddddeeee).  cccc3333 sets red, green, and blue to the specified values, and
  51.      sets alpha to the maximum value.  The current framebuffer must be in RGB
  52.      mode (see RRRRGGGGBBBBmmmmooooddddeeee) for the cccc command to be applicable.  Most drawing
  53.      commands copy the current RGBA color components into the color bitplanes
  54.      of the current framebuffer.  Color components are retained in each draw
  55.      mode, so when a draw mode is re-entered, red, green, blue, and alpha are
  56.      reset to the last values specified in that draw mode.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. cccc((((3333GGGG))))                                                                    cccc((((3333GGGG))))
  71.  
  72.  
  73.  
  74.      Integer color component values range from 0, specifying no intensity,
  75.      through 255, specifying maximum intensity.  Floating point color
  76.      component values range from 0.0, specifying no intensity, through 1.0,
  77.      specifying maximum intensity.
  78.  
  79.      It is an error to call cccc while the current framebuffer is in color map
  80.      mode.
  81.  
  82.      The color components of all framebuffers in RGB mode are set to zero when
  83.      ggggccccoooonnnnffffiiiigggg is called.
  84.  
  85. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  86.      cpack, drawmode, lmcolor, gRGBcolor
  87.  
  88. NNNNOOOOTTTTEEEE
  89.      These routines can also be used to modify the current material while
  90.      lighting is active (see llllmmmmccccoooolllloooorrrr).  Note that clamping to 1.0 is disabled
  91.      in this case.
  92.  
  93.      Because only the normal framebuffer currently supports RGB mode, cccc should
  94.      be called only while draw mode is NNNNOOOORRRRMMMMAAAALLLLDDDDRRRRAAAAWWWW.  Use ggggeeeettttggggddddeeeesssscccc to determine
  95.      whether RGB mode is available in draw mode NNNNOOOORRRRMMMMAAAALLLLDDDDRRRRAAAAWWWW.
  96.  
  97. BBBBUUUUGGGGSSSS
  98.      On the IRIS-4D/120GTX and IRIS-4D/140GTX, there is problem with the
  99.      graphics DMA hardware that can cause data to be sent to the hardware
  100.      after the subroutine call has returned.  If the data is modified
  101.      immediately after the subroutine call, the modified data may get sent
  102.      down.  To avoid this, don't modify the data until after another nnnn, vvvv, or
  103.      cccc call has been made.
  104.  
  105.      This is an example of the bug:
  106.  
  107.           vertex[2] = 1.0;
  108.           v3f(vertex);   /* 4D/1x0 GTX hardware may receive 3.0 for the z value */
  109.           vertex[2] = 3.0;
  110.           v3f(vertex);
  111.  
  112.  
  113.      This is one way to work around the problem:
  114.  
  115.           vertexA[2] = 1.0;
  116.           v3f(vertexA);
  117.           vertexB[2] = 3.0;
  118.           v3f(vertexB);
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.